
<div class="container">
        <h3 class="wrapTitle">- REVIEWS - </h3>
        <h4 class="contboxh4"><a href="javascript://" id="add-reviwebox" class="addQuestionSub" style="display:none;">ADD REVIEWS</a><b>REVIEWS</b></h4>
        
        <div class="evaluation-bott pa-to-25 cliks-bn" style="display:block" id="ajax_comment_return"></div>
</div>

<div class="postrevBox" id="reviewForm" style="display:none;">
<div class="container" style="position:relative;">
<b class="postClose" id="postClose1">X</b>
<h3 class="wrapTitle">Write A Review</h3>
<a name="reviewForm"></a>
<form action="#" method="post" id="review-form">
<div class="form-add postFormBox">        
    <label for="review_field" class="required"><em>*</em>Review</label>
    <div class="input-box">
    <textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"></textarea>
    </div>
</div>
<div class="postFormBoxli clearfix">
    <input type="hidden" name="validate_rating" class="validate-rating" value="">
    <script type="text/javascript">decorateTable('product-review-table')</script>         
         
    <div class="col-sm-2">
        <b>Quality of Service</b>            
    </div>        
    <div class="col-sm-10">			
             <label><input type="radio" name="ratings[3]" id="Quality of Service_1" value="11" class="radio"> <i class="Bstar star_1"></i>  </label>
             <label><input type="radio" name="ratings[3]" id="Quality of Service_2" value="12" class="radio"> <i class="Bstar star_2"></i>  </label>
             <label><input type="radio" name="ratings[3]" id="Quality of Service_3" value="13" class="radio"> <i class="Bstar star_3"></i>  </label>
             <label><input type="radio" name="ratings[3]" id="Quality of Service_4" value="14" class="radio"> <i class="Bstar star_4"></i>  </label>
             <label><input type="radio" name="ratings[3]" id="Quality of Service_5" value="15" class="radio"> <i class="Bstar star_5"></i>  </label>
                   
    </div>        
    <div class="col-sm-12"></div>
         
    <div class="col-sm-2">
        <b>Value of Product</b>            
    </div>        
    <div class="col-sm-10">			
             <label><input type="radio" name="ratings[2]" id="Value of Product_1" value="6" class="radio"> <i class="Bstar star_1"></i>  </label>
             <label><input type="radio" name="ratings[2]" id="Value of Product_2" value="7" class="radio"> <i class="Bstar star_2"></i>  </label>
             <label><input type="radio" name="ratings[2]" id="Value of Product_3" value="8" class="radio"> <i class="Bstar star_3"></i>  </label>
             <label><input type="radio" name="ratings[2]" id="Value of Product_4" value="9" class="radio"> <i class="Bstar star_4"></i>  </label>
             <label><input type="radio" name="ratings[2]" id="Value of Product_5" value="10" class="radio"> <i class="Bstar star_5"></i>  </label>
                   
    </div>        
    <div class="col-sm-12"></div>
         
    <div class="col-sm-2">
        <b>Quality of Product</b>            
    </div>        
    <div class="col-sm-10">			
             <label><input type="radio" name="ratings[1]" id="Quality of Product_1" value="1" class="radio"> <i class="Bstar star_1"></i>  </label>
             <label><input type="radio" name="ratings[1]" id="Quality of Product_2" value="2" class="radio"> <i class="Bstar star_2"></i>  </label>
             <label><input type="radio" name="ratings[1]" id="Quality of Product_3" value="3" class="radio"> <i class="Bstar star_3"></i>  </label>
             <label><input type="radio" name="ratings[1]" id="Quality of Product_4" value="4" class="radio"> <i class="Bstar star_4"></i>  </label>
             <label><input type="radio" name="ratings[1]" id="Quality of Product_5" value="5" class="radio"> <i class="Bstar star_5"></i>  </label>
                   
    </div>        
    <div class="col-sm-12"></div>
        <div class="col-sm-2">
    <label for="summary_field" class="required"><em>*</em>Your Review</label>
    </div>
    <div class="col-sm-4"><input type="text" name="title" id="summary_field" class="input-text required-entry" value="">
    </div>
    
    <div class="col-sm-2">
    <label for="nickname_field" class="required"><em>*</em>Nickname</label>
    </div>
    <div class="col-sm-4"><input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="">
    </div>
    
    <div class="col-sm-12"><hr></div>
    <div class="col-sm-12">
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.
    </div>
    <div class="col-sm-12"><button type="submit" title="Submit Review" class="button">Submit Review</button></div>
</div>
</form>
</div>

</div>

  <script>
	 $("#add-reviwebox").click(function(){
				if($("#reviewForm").css("display")=="none") {
                    $("#reviewForm").show();
                }
                else    {
                    $("#reviewForm").hide();
                }
			});
	 $("#postClose1").click(function(){
                    $("#reviewForm").hide();
			});
</script>


                <script>
                    $(document).ready(function(){
                        commentType = 1; // 评论类型
                        ajaxComment(1,1);// ajax 加载评价列表
                    });

                    // 好评差评 切换
                    $(".eval-cen-le a").click(function(){
                        $(".eval-cen-le li").removeClass('curres');
                        $(this).parent().addClass('curres');
                        commentType = $(this).data('t');// 评价类型   好评 中评  差评
                        ajaxComment(commentType,1);
                    });

                    // 用ajax分页显示评论
                    function ajaxComment(commentType,page){
                        $.ajax({
                            type : "GET",
                            url:"/index.php?m=Home&c=Goods&a=ajaxComment&goods_id={$goods['goods_id']}&commentType="+commentType+"&p="+page,//+tab,
                            success: function(data){
                                $("#ajax_comment_return").html('');
                                $("#ajax_comment_return").append(data);
                            }
                        });
                    }
                </script>